package com.kfm.boot.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

@RestController
@RequestMapping("/error")
public class ErrorController {

    @RequestMapping("/demo")
    public ModelAndView error(ModelAndView mv)  {
//        throw new ServiceException("模拟异常");
//        throw new Exception("模拟异常");
        throw new RuntimeException("模拟异常");
    }
}
